<?php 
    require_once ('../connect.php');
    //接收图片参数
    $username = $_POST['username'];
    $date = $_POST['date'];
    //查找用户
    $user_sql = "select u_id from user where username = '$username'";
    $user_result = $con->query($user_sql);
    $user_row = $user_result->fetch_assoc();
    $user_id = $user_row['u_id'];
    //查找图片及简介
    $photo_sql = "select location,introduction from photo_wall where user_id = $user_id and photo_date = '$date'";
    $photo_result = $con->query($photo_sql);
    $photo_row = $photo_result->fetch_assoc();
    $photo_modify_content = array(
        "photo_location" => $photo_row['location'],
        "photo_introduction" => $photo_row['introduction']
    );
    $temp = json_encode($photo_modify_content,JSON_UNESCAPED_UNICODE);
    $temp = str_replace("\/", "/", $temp);
    echo $temp;
?>